// @ts-nocheck
// export { ContactItem, Chat, ContactList }
import React, { useState } from 'react';
import { Chat } from 'react-jwchat';
function Aquaculture_technical_advice() {
  const contact = {
    id: 1,
    avatar: 'https://img.qkeep.cn/imgs/202208212209900.png',
    nickname: '专家在线解疑',
    message: '这是一条信息',
    date: '02-11',
    desc: '一行简短的简介'
  };
  const my = {
    id: 2,
    // avatar: '//game.gtimg.cn/images/lol/act/img/champion/Jinx.png',
    nickname: '农户',
    message: '在吗',
    date: '02-11',
    desc: '一行简短的简介'
  };
  const [msgList, setMsgList] = useState([
    {
      _id: '75b5bde8f3b9ef7aa9b704492cb28baf',
      date: 1610016580,
      user: {
        id: 1,
        avatar: 'https://img.qkeep.cn/imgs/202208212209900.png',
        nickname: '砖家',
        desc: '这是我的第一条信息'
      },
      message: { type: 'text', content: '欢迎咨询肉鸡养殖相关问题' }
    },
    {
      _id: '75b5bde8f3b9ef7aa12704492cb28baf',
      date: new Date().getTime(),
      user: {
        id: 2,
        avatar: 'https://img.qkeep.cn/imgs/202208212209900.png',
        nickname: '农户',
        desc: '这是我的第一条信息'
      },
      message: { type: 'text', content: '在吗' }
    }
  ]);
  const sendMsg = (msg) => {
    setMsgList([...msgList, msg]);
  };
  return (
    <div>
      <Chat
        contact={contact}
        me={my}
        chatList={msgList}
        onSend={(msg) => sendMsg(msg)}
        style={{
          width: 600,
          height: 500
        }}
      />
    </div>
  );
}

export default Aquaculture_technical_advice;
